package com.android.model;


import com.android.bean.ResponseData;
import com.android.bean.User;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/*
"http://47.107.52.7:88/member/photo/user/login?password=123456&username=fangshicai"
 */
public interface longinHttp_Interface {
    @GET("demo/login")
//    @FormUrlEncoded
    @Headers({"appId:46351c5d3fdd44a084167c7186772a2e","appSecret:21671c3772dd71d3340f3ae77355421aa335f"})
    Call<ResponseData<User>> service(@Query("password") String password
                                , @Query("username") String username
            );

    @POST("demo/create")
//    @FormUrlEncoded
    @Headers({"appId:46351c5d3fdd44a084167c7186772a2e","appSecret:21671c3772dd71d3340f3ae77355421aa335f"})
    Call<ResponseData<String>> rejest(@Body User user);


    @GET("demo/login")
    @Headers({"appId:46351c5d3fdd44a084167c7186772a2e","appSecret:21671c3772dd71d3340f3ae77355421aa335f"})
    Observable<ResponseData<User>> getObservableTest(@Query("password") String password
            , @Query("username") String username
    );


}
